Telegram Group & Telegram Channel
✏️ Шпаргалка: как можно получить тип класса?

1. Получение типа класса через функцию ::class

Функция ::class возвращает объект KClass, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person::class) // выводит "class Person"
}


2. Получение типа класса через функцию
javaClass

Функция javaClass возвращает объект Class, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person.javaClass) // выводит "class Person"
}


3. Получение типа класса через функцию
::class.java

Вызов функции ::class.java на объекте типа KClass возвращает объект Class, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person::class.java) // выводит "class Person"
}


🐸 Библиотека мобильного разработчика 

#буст
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/mobileproglib/5824
Create:
Last Update:

✏️ Шпаргалка: как можно получить тип класса?

1. Получение типа класса через функцию ::class

Функция ::class возвращает объект KClass, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person::class) // выводит "class Person"
}


2. Получение типа класса через функцию
javaClass

Функция javaClass возвращает объект Class, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person.javaClass) // выводит "class Person"
}


3. Получение типа класса через функцию
::class.java

Вызов функции ::class.java на объекте типа KClass возвращает объект Class, который содержит информацию о типе класса во время выполнения.

class Person(val name: String, val age: Int)

fun main() {
val person = Person("John", 30)
println(person::class.java) // выводит "class Person"
}


🐸 Библиотека мобильного разработчика 

#буст

BY Библиотека мобильного разработчика | Android, iOS, Swift, Retrofit, Moshi, Chuck


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/mobileproglib/5824

View MORE
Open in Telegram


Библиотека мобильного разработчика | Android iOS Swift Retrofit Moshi Chuck Telegram | DID YOU KNOW?

Date: |

Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.

How To Find Channels On Telegram?

There are multiple ways you can search for Telegram channels. One of the methods is really logical and you should all know it by now. We’re talking about using Telegram’s native search option. Make sure to download Telegram from the official website or update it to the latest version, using this link. Once you’ve installed Telegram, you can simply open the app and use the search bar. Tap on the magnifier icon and search for a channel that might interest you (e.g. Marvel comics). Even though this is the easiest method for searching Telegram channels, it isn’t the best one. This method is limited because it shows you only a couple of results per search.

Библиотека мобильного разработчика | Android iOS Swift Retrofit Moshi Chuck from hk


Telegram Библиотека мобильного разработчика | Android, iOS, Swift, Retrofit, Moshi, Chuck
FROM USA